package com.yonyou.cyxdms.sysAuth.service.service.manage.employee;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yonyou.cyx.framework.bean.dto.framework.RestResultResponse;
import com.yonyou.cyx.framework.compent.redis.RedisClient;
import com.yonyou.cyx.framework.util.bean.ApplicationContextHelper;
import com.yonyou.cyx.function.exception.DMSAuthException;
import com.yonyou.cyx.function.exception.ServiceBizException;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.function.utils.common.CommonUtils;
import com.yonyou.cyx.function.utils.common.DateUtil;
import com.yonyou.cyx.function.utils.common.StringUtils;
import com.yonyou.cyx.function.utils.jsonserializer.JSONUtil;
import com.yonyou.cyxdms.framework.bean.dto.user_info.LoginInfoDto;
import com.yonyou.cyxdms.sysAuth.service.constants.ManageDictCodeConstants;
import com.yonyou.cyxdms.sysAuth.service.constants.SysAuthCommonConstants;
import com.yonyou.cyxdms.sysAuth.service.constants.SysAuthDictCodeConstants;
import com.yonyou.cyxdms.sysAuth.service.controller.DbUnionCommonDto;
import com.yonyou.cyxdms.sysAuth.service.dto.CodeDTO;
import com.yonyou.cyxdms.sysAuth.service.dto.EmployeeUpdateDTO;
import com.yonyou.cyxdms.sysAuth.service.dto.UserDTO;
import com.yonyou.cyxdms.sysAuth.service.dto.role.RolePDto;
import com.yonyou.cyxdms.sysAuth.service.dto.user.EmployeeDTO;
import com.yonyou.cyxdms.sysAuth.service.dto.userorgsource.UserorgSourceDTO;
import com.yonyou.cyxdms.sysAuth.service.entity.*;
import com.yonyou.cyxdms.sysAuth.service.entity.userorgsource.UserorgSourcePO;
import com.yonyou.cyxdms.sysAuth.service.feign.*;
import com.yonyou.cyxdms.sysAuth.service.feign.dto.BrokerInfoDTO;
import com.yonyou.cyxdms.sysAuth.service.feign.dto.UserInfoDTO;
import com.yonyou.cyxdms.sysAuth.service.mapper.*;
import com.yonyou.cyxdms.sysAuth.service.service.Login.UserLoginService;
import com.yonyou.cyxdms.sysAuth.service.service.Login.WechatScanLoginService;
import com.yonyou.cyxdms.sysAuth.service.service.jwt.JwtService;
import com.yonyou.cyxdms.sysAuth.service.service.role.RoleCtrlService;
import com.yonyou.cyxdms.sysAuth.service.service.role.RoleMenuActionService;
import com.yonyou.cyxdms.sysAuth.service.service.role.RoleMenuRangeService;
import com.yonyou.cyxdms.sysAuth.service.service.role.RoleService;
import com.yonyou.cyxdms.sysAuth.service.service.userorgsource.UserorgSourceService;
import com.yonyou.cyxdms.sysAuth.service.utill.MD5Util;
import com.yonyou.cyxdms.sysAuth.service.vo.employee.*;
import com.yonyou.cyxdms.sysAuth.service.vo.weChat.SmsWxVo;
import com.yonyou.cyxdms.sysAuth.service.vo.weChat.WechatInfo;
import com.yonyou.cyxdms.sysmanage.client.constants.BaseDataCommonConstants;
import com.yonyou.cyxdms.sysmanage.client.domains.dto.EmployeeDictDto;
import com.yonyou.cyxdms.sysmanage.client.service.login.PushServices;
import com.yonyou.cyxdms.sysmanage.client.vo.employee.EmployeeOrgsVO;
import com.yonyou.cyxdms.sysmanage.client.vo.employee.EmployeeVO;
import com.yonyou.cyxdms.sysmanage.client.vo.user.UserInfoVO;
import io.swagger.annotations.Api;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.text.MessageFormat;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;

/**
 * 经销商员工信息
 *
 * @author renwd
 * @since 2019/7/9
 */

@Api(value = "经销商员工信息", tags = { "经销商员工" +
		"信息" })
@Service
@Transactional(rollbackFor = Exception.class)
public class EmployeeNewServiceImpl  implements EmployeeNewService {

	@Autowired
	EmpNewMapper  empNewMapper;


	@Override
	public List<UserInfoVO> queryConsultantList() {
		LoginInfoDto loginInfoDto = ApplicationContextHelper.getBeanByType(LoginInfoDto.class);
		return empNewMapper.queryConsultantList(loginInfoDto.getAppId(),loginInfoDto.getOwnerCode());

	}
}
